<?php
define('ipos',true);
	if (isset($_POST["PHPSESSID"])) {
		session_id($_POST["PHPSESSID"]);
	}
	require('../include/config.php');
	require("../include/upload.php");
	if (isset($_POST['phimid'])  || isset($_FILES["Filedata"]) || is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] = 0) {
		$upload	=	ipupload("Filedata","info",$_POST['fileoner'].'-'.NOW);
		if($upload) {
			$arr	=	$db->database("phiminfo","film_info","phimid = '".$_POST['phimid']."'");
			if($arr[0][0] == '')	
				$db->dbupdate("film_info","phiminfo = '$upload'","phimid = '".$_POST['phimid']."'");
			else {
				$upload	=	$upload.','.$arr[0][0];
				$db->dbupdate("film_info","phiminfo = '$upload'","phimid = '".$_POST['phimid']."'");
			}
			echo 1;
		}
	}
	exit(0);
?>